package com.demo.gulimall.seckill.entity;

import java.util.Date;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import java.io.Serializable;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

/**
 * 秒杀活动
 *
 * @author Chen Yuan
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("sms_seckill_promotion")
public class SeckillPromotion implements Serializable {
	/** id */
	@TableId(type = IdType.ID_WORKER) // 老版本
    //@TableId(type = IdType.ASSIGN_ID) // 新版本
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`id`")
	private Long id;

	/** 活动标题 */
	@TableField(value = "`title`")
	private String title;

	/** 开始日期 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="Asia/Shanghai")
	@TableField(value = "`start_time`")
	private Date startTime;

	/** 结束日期 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="Asia/Shanghai")
	@TableField(value = "`end_time`")
	private Date endTime;

	/** 上下线状态 */
	@TableField(value = "`status`")
	private Byte status;

	/** 创建时间 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="Asia/Shanghai")
	@TableField(value = "`create_time`")
	private Date createTime;

	/** 创建人 */
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`user_id`")
	private Long userId;

}
